<?php
/**
 *
 *
 * This file is part of Webappkit, a packages system for PHP web apps
 * @link http://webappkit.net
 * @package dj
 * @subpackage forms
 * @author J.Ducastel <nospam0@ducastel.name>
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 */


class DjSlugField extends DjRegexField {

    /*public function clean($value) {
        $this->_normalize($value);
        $this->_cleanRequired($value);
        if (!preg_match('^[-\w]+$',$value)) {
            throw new DjValidationError($this->error_messages['invalid']);
        }
        return $value;
    }*/

    public $regex = '/^[a-zA-Z0-9-\s_]*$/i';
}